﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Final.App_Code;

namespace Final
{
    public partial class Redirect : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Student c = new Student();
            string role = c.RetrieveRole(User.Identity.Name);
            if (role.Equals("student"))
            {
                Response.Redirect("~/Student_Home.aspx");
            }
            else if (role.Equals("lecturer"))
            {
                Response.Redirect("~/Lect_Home.aspx");
            }
        }
    }
}